﻿<!DOCTYPE>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath(); 
	//获得本项目的地址(例如: http://localhost:8080/MyApp/)赋值给basePath变量 
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
	pageContext.setAttribute("basePath",basePath); 
	pageContext.setAttribute("path",path); 
%>    
<html>
<head>
<link rel="stylesheet" type="text/css" href="${basePath}css/style.css"/>
<script type="text/javascript" src="${basePath}js/jquery-3.2.1.js"></script>
<title>基本信息</title>
<meta content="description" name="description">
<meta content="keywords" name="keywords">
</head>

<body>
	<div id="body">
		<%@include file="../header.jsp"%>
		<!-- end #header -->
		<div id="container">

			<div class="clearfix">
				<div class="content_l">
					<dl class="c_delivery">
						<dt>
							<h1>
								<em></em>已投递简历状态
							</h1>
						</dt>
						<dd>
							<div class="delivery_tabs">
								<ul class="reset">
									<!-- <li><a href="javascript:deliveryInfo('','');">全部</a></li> -->
									<li><a href="javascript:deliveryInfo('no','');" id="clickthis">未被查看</a></li>
									<!-- <li><a href="javascript:deliveryInfo('yes','');">被查看</a></li> -->
									<li><a href="javascript:deliveryInfo('','yes');">通过筛选</a></li>
									<li class="last"><a href="javascript:deliveryInfo('','no');">不合适</a></li>
								</ul>
							</div>
							<form id="deliveryForm">
								<ul class="reset my_delivery">
									<li id="dataUl">
									</li>
								</ul>
							</form>
						</dd>
					</dl>
				</div>

			</div>
			<div class="clear"></div>
			 
		</div>
	</div>
	<!-- end #body -->
<script type="text/javascript">
$(function() {
	deliveryInfo("no","");
});
function deliveryInfo(isRead,isPass){
	$.ajax({
		type : 'post',
		url : '${basePath}user/deliveryInfo',
		dataType : "json",
		data : {
			isRead : isRead,
			isPass : isPass
		},
		success : function(result) {
			var model = result.model;
			console.log("提交成功");
			if (model.code == 0) {
				var list = model.list;
				$("#dataUl").html("");
				if (list.length == 0) {
					$("#dataUl").append('<div class="addnew">没有相应信息，快去投递简历吧……<br></div>');
				}
				for (var i = 0; i < list.length; i++) {
					var tem = "";
					tem += '<div class="d_item"><h2><a target="_blank" href="${basePath}user/jobDetail/'+list[i].riId+'"> <em>'+list[i].positionDesc+'</em>';
					tem += '<span>（'+list[i].salaryMin+'k-'+list[i].salaryMax+'k）</span></a></h2><div class="clear"></div>';
					tem += ' <span>'+ list[i].workCity+'</span>';
					tem += '</a> <span class="d_time">'+ new Date(list[i].publishTime).toLocaleDateString()+'</span><div class="clear"></div>';
					tem += '<div class="d_resume">使用简历： <span> 在线简历 </span></div><a class="btn_showprogress" href="javascript:;">';
					if(isRead=="no"){
						tem += "未被查看";
					}
					if(isPass=="yes"){
						tem += "通过筛选";
					}
					if(isPass=="no"){
						tem += "不合适";
					}
					tem += '<i></i></a></div>';
					$("#dataUl").append(tem);
				}
			}else{
				console.log(model.msg);
				alert(model.msg);
			}
		},
		error : function(){
			alert("系统异常");
		}
	});
}
</script>
</body>
</html>